package dapps.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;


/**
 * <b>系统初始化监听器</b><br>
 * 目的：加载全局配置文件并保存到Context范围内
 *
 */
public class SystemInitListener implements ServletContextListener {


	/**
	 * 销毁函数
	 */
	public void contextDestroyed(ServletContextEvent contextEvent) {
		//ServletContext context = contextEvent.getServletContext();
	}

	/**
	 * 初始化加载
	 */
	public void contextInitialized(ServletContextEvent contextEvent) {
		
		ServletContext context = contextEvent.getServletContext();
		context.setAttribute("dd", "xxx");
	}

}
